#ifndef _KEY_H
#define _KEY_H
    #include "chipio_def.h"
    #define KEY1_STATE HAL_GPIO_ReadPin(KEY_PORT, KEY1_PIN)
    #define KEY2_STATE HAL_GPIO_ReadPin(KEY_PORT, KEY2_PIN)

    #define KEY0_PRES    1              /* KEY0按下 */
    #define KEY1_PRES    2              /* KEY1按下 */
    #define KEY2_PRES    3              /* KEY2按下 */
    #define WKUP_PRES    4              /* KEY_UP按下(即WK_UP) */

    void Key_Init(void);
    int Key_GetNum(void);
    void TestKey(void);
#endif